/*
  ==============================================================================

  This is an automatically generated file created by the Jucer!

  Creation date:  27 May 2008 12:27:53 pm

  Be careful when adding custom code to these files, as only the code within
  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  and re-saved.

  Jucer version: 1.11

  ------------------------------------------------------------------------------

  The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
  Copyright 2004-6 by Raw Material Software ltd.

  ==============================================================================
*/

//[Headers] You can add your own extra header files here...
#include "Ketonal.h"
#include "KetonalSettingsWindow.h"
//[/Headers]

#include "KetonalSettingsComponent.h"


//[MiscUserDefs] You can add your own user definitions and misc code here...
//[/MiscUserDefs]

//==============================================================================
KetonalSettingsComponent::KetonalSettingsComponent (Ketonal *_p)
    : thread ("config list"), parent(_p),
      configFolderPath (0),
      configFolderBrowse (0),
      label (0),
      okButton (0),
      configList (0),
      configAdd (0),
      configDelete (0),
      configEdit (0)
{
    addAndMakeVisible (configFolderPath = new TextEditor (T("Configs Path")));
    configFolderPath->setTooltip (T("Configs Path"));
    configFolderPath->setMultiLine (false);
    configFolderPath->setReturnKeyStartsNewLine (false);
    configFolderPath->setReadOnly (true);
    configFolderPath->setScrollbarsShown (false);
    configFolderPath->setCaretVisible (false);
    configFolderPath->setPopupMenuEnabled (true);
    configFolderPath->setColour (TextEditor::backgroundColourId, Colours::white);
    configFolderPath->setColour (TextEditor::shadowColourId, Colours::white);
    configFolderPath->setText (String::empty);

    addAndMakeVisible (configFolderBrowse = new ImageButton (T("Browse")));
    configFolderBrowse->setTooltip (T("Browse for Directory"));
    configFolderBrowse->setButtonText (T("new button"));
    configFolderBrowse->addButtonListener (this);

    configFolderBrowse->setImages (false, true, true,
                                   ImageCache::getFromMemory (folder_png, folder_pngSize), 0.7233f, Colour (0x0),
                                   ImageCache::getFromMemory (folder_png, folder_pngSize), 1.0000f, Colour (0x0),
                                   0, 1.0000f, Colour (0x0));
    addAndMakeVisible (label = new Label (T("new label"),
                                          T("Configs Folder")));
    label->setFont (Font (9.0000f, Font::plain));
    label->setJustificationType (Justification::centredLeft);
    label->setEditable (false, false, false);
    label->setColour (TextEditor::textColourId, Colours::black);
    label->setColour (TextEditor::backgroundColourId, Colour (0x0));

    addAndMakeVisible (okButton = new TextButton (T("new button")));
    okButton->setTooltip (T("OK"));
    okButton->setButtonText (T("OK"));
    okButton->setConnectedEdges (Button::ConnectedOnLeft | Button::ConnectedOnRight);
    okButton->addButtonListener (this);
    okButton->setColour (TextButton::buttonColourId, Colour (0xffadadad));

    addAndMakeVisible (configList = new KetonalSettingsComponentConfigs (parent->getSettings()->getContentsList()));
    configList->setName (T("Config List"));

    addAndMakeVisible (configAdd = new ImageButton (T("Add Config")));
    configAdd->setTooltip (T("New Config"));
    configAdd->setButtonText (T("new button"));
    configAdd->addButtonListener (this);

    configAdd->setImages (false, true, true,
                          ImageCache::getFromMemory (add_png, add_pngSize), 0.5646f, Colour (0x0),
                          ImageCache::getFromMemory (add_png, add_pngSize), 1.0000f, Colour (0x0),
                          0, 1.0000f, Colour (0x0));
    addAndMakeVisible (configDelete = new ImageButton (T("Delete Config")));
    configDelete->setTooltip (T("Delete Config"));
    configDelete->setButtonText (T("new button"));
    configDelete->addButtonListener (this);

    configDelete->setImages (false, true, true,
                             ImageCache::getFromMemory (delete_png, delete_pngSize), 0.5646f, Colour (0x0),
                             ImageCache::getFromMemory (delete_png, delete_pngSize), 1.0000f, Colour (0x0),
                             0, 1.0000f, Colour (0x0));
    addAndMakeVisible (configEdit = new ImageButton (T("Edit Config")));
    configEdit->setTooltip (T("Edit Config"));
    configEdit->setButtonText (T("new button"));
    configEdit->addButtonListener (this);

    configEdit->setImages (false, true, true,
                           ImageCache::getFromMemory (edit_png, edit_pngSize), 0.5646f, Colour (0x0),
                           0, 1.0000f, Colour (0x0),
                           0, 1.0000f, Colour (0x0));

    //[UserPreSize]
	configWindow = 0;
    //[/UserPreSize]

    setSize (256, 128);

    //[Constructor] You can add your own custom stuff here..
	configFolderPath->setFont (Font(9));
	configFolderPath->setText (parent->getSettings()->getDefaultConfigsDirectory(), false);
	configFolderPath->setCaretPosition (0);

	configList->addListener (this);
    //[/Constructor]
}

KetonalSettingsComponent::~KetonalSettingsComponent()
{
    //[Destructor_pre]. You can add your own custom destruction code here..
	parent->cacheConfigs();

	if (configWindow)
		deleteAndZero (configWindow);
    //[/Destructor_pre]

    deleteAndZero (configFolderPath);
    deleteAndZero (configFolderBrowse);
    deleteAndZero (label);
    deleteAndZero (okButton);
    deleteAndZero (configList);
    deleteAndZero (configAdd);
    deleteAndZero (configDelete);
    deleteAndZero (configEdit);

    //[Destructor]. You can add your own custom destruction code here..
	if (configList)
		deleteAndZero (configList);
    //[/Destructor]
}

//==============================================================================
void KetonalSettingsComponent::paint (Graphics& g)
{
    //[UserPrePaint] Add your own custom painting code here..
    //[/UserPrePaint]

    GradientBrush gradient_1 (Colour (0x8acdcdcd),
                              136.0f, 64.0f,
                              Colour (0xff979797),
                              152.0f, 200.0f,
                              true);
    g.setBrush (&gradient_1);
    g.fillRoundedRectangle (0.0f, 0.0f, 256.0f, 128.0f, 10.0000f);

    //[UserPaint] Add your own custom painting code here..
    //[/UserPaint]
}

void KetonalSettingsComponent::resized()
{
    configFolderPath->setBounds (8, 16, 192, 16);
    configFolderBrowse->setBounds (208, 8, 32, 32);
    label->setBounds (16, 8, 63, 8);
    okButton->setBounds (216, 106, 32, 16);
    configList->setBounds (8, 40, 192, 80);
    configAdd->setBounds (208, 72, 16, 16);
    configDelete->setBounds (232, 72, 16, 16);
    configEdit->setBounds (218, 48, 16, 16);
    //[UserResized] Add your own custom resize handling here..
    //[/UserResized]
}

void KetonalSettingsComponent::buttonClicked (Button* buttonThatWasClicked)
{
    //[UserbuttonClicked_Pre]
    //[/UserbuttonClicked_Pre]

    if (buttonThatWasClicked == configFolderBrowse)
    {
        //[UserButtonCode_configFolderBrowse] -- add your button handler code here..
		FileChooser folderChooser ("Select folder", File::getSpecialLocation (File::userHomeDirectory), "*.*");
		if (folderChooser.browseForDirectory ())
		{
			File configDirectory (folderChooser.getResult());
			parent->getSettings()->setDefaultConfigsDirectory (configDirectory.getFullPathName());
			configFolderPath->setText (parent->getSettings()->getDefaultConfigsDirectory(), false);
			parent->getSettings()->getContentsList()->setDirectory (configDirectory, false, true);
		}
        //[/UserButtonCode_configFolderBrowse]
    }
    else if (buttonThatWasClicked == okButton)
    {
        //[UserButtonCode_okButton] -- add your button handler code here..
		((KetonalSettingsWindow *)getParentComponent())->close();
        //[/UserButtonCode_okButton]
    }
    else if (buttonThatWasClicked == configAdd)
    {
        //[UserButtonCode_configAdd] -- add your button handler code here..
        //[/UserButtonCode_configAdd]
    }
    else if (buttonThatWasClicked == configDelete)
    {
        //[UserButtonCode_configDelete] -- add your button handler code here..
		const File f = configList->getSelectedFile();
		if (f.exists())
		{
			int r = AlertWindow::showYesNoCancelBox (AlertWindow::QuestionIcon, T("Are ya sure?"), T("Do you want to delete this config?"));
			if (r == 0)
				return;
			if (r == 1)
			{
				/* delete the file and re-read configs */
				
				if (!f.deleteFile())
				{
					Logger::writeToLog (T("Can't delete config"));
				}
				parent->cacheConfigs();
			}
			if (r == 2)
			{
				return;
			}
		}
        //[/UserButtonCode_configDelete]
    }
    else if (buttonThatWasClicked == configEdit)
    {
        //[UserButtonCode_configEdit] -- add your button handler code here..
		editConfig(configList->getSelectedFile());
        //[/UserButtonCode_configEdit]
    }

    //[UserbuttonClicked_Post]
    //[/UserbuttonClicked_Post]
}



//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void KetonalSettingsComponent::mouseDrag (const MouseEvent& e)
{
	myDragger.dragComponent (getParentComponent(), e);
}

void KetonalSettingsComponent::mouseDown (const MouseEvent& e)
{
	myDragger.startDraggingComponent (getParentComponent(), 0);
}

void KetonalSettingsComponent::fileDoubleClicked (const File &file)
{
	editConfig (file);
}

void KetonalSettingsComponent::fileClicked (const File &file, const MouseEvent &e)
{
}

void KetonalSettingsComponent::selectionChanged ()
{
}

void KetonalSettingsComponent::editConfig (const File file)
{
	if (!configWindow)
	{
		if (file.exists() && file.hasFileExtension(T("xml")))
		{
			configWindow = new KetonalConfigWindow (this, file);
		}
	}
	else
	{
		deleteAndZero (configWindow);
		configWindow = new KetonalConfigWindow (this, file);
		configWindow->toFront (true);
	}
}

void KetonalSettingsComponent::deleteConfig (const File file)
{
}

void KetonalSettingsComponent::newConfig ()
{
}

void KetonalSettingsComponent::closeConfig()
{
	if (configWindow)
	{
		configWindow = 0;
	}
}
//[/MiscUserCode]


//==============================================================================
#if 0
/*  -- Jucer information section --

    This is where the Jucer puts all of its metadata, so don't change anything in here!

BEGIN_JUCER_METADATA

<JUCER_COMPONENT documentType="Component" className="KetonalSettingsComponent"
                 componentName="" parentClasses="public Component, public FileBrowserListener"
                 constructorParams="Ketonal *_p" variableInitialisers="thread (&quot;config list&quot;), parent(_p)"
                 snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330000013"
                 fixedSize="1" initialWidth="256" initialHeight="128">
  <BACKGROUND backgroundColour="ffffff">
    <ROUNDRECT pos="0 0 256 128" cornerSize="10" fill=" radial: 136 64, 152 200, 0=8acdcdcd, 1=ff979797"
               hasStroke="0"/>
  </BACKGROUND>
  <TEXTEDITOR name="Configs Path" id="84f22f3fe797d72c" memberName="configFolderPath"
              virtualName="" explicitFocusOrder="0" pos="8 16 192 16" tooltip="Configs Path"
              bkgcol="ffffffff" shadowcol="ffffffff" initialText="" multiline="0"
              retKeyStartsLine="0" readonly="1" scrollbars="0" caret="0" popupmenu="1"/>
  <IMAGEBUTTON name="Browse" id="905aff2f8cb2c716" memberName="configFolderBrowse"
               virtualName="" explicitFocusOrder="0" pos="208 8 32 32" tooltip="Browse for Directory"
               buttonText="new button" connectedEdges="0" needsCallback="1"
               radioGroupId="0" keepProportions="1" resourceNormal="folder_png"
               opacityNormal="0.723270416" colourNormal="0" resourceOver="folder_png"
               opacityOver="1" colourOver="0" resourceDown="" opacityDown="1"
               colourDown="0"/>
  <LABEL name="new label" id="4434cc5f3df59a96" memberName="label" virtualName=""
         explicitFocusOrder="0" pos="16 8 63 8" edTextCol="ff000000" edBkgCol="0"
         labelText="Configs Folder" editableSingleClick="0" editableDoubleClick="0"
         focusDiscardsChanges="0" fontname="Default font" fontsize="9"
         bold="0" italic="0" justification="33"/>
  <TEXTBUTTON name="new button" id="4d0ea1b2ff8a9918" memberName="okButton"
              virtualName="" explicitFocusOrder="0" pos="216 106 32 16" tooltip="OK"
              bgColOff="ffadadad" buttonText="OK" connectedEdges="3" needsCallback="1"
              radioGroupId="0"/>
  <GENERICCOMPONENT name="Config List" id="d91e7399297d352c" memberName="configList"
                    virtualName="" explicitFocusOrder="0" pos="8 40 192 80" class="KetonalSettingsComponentConfigs"
                    params="parent-&gt;getSettings()-&gt;getContentsList()"/>
  <IMAGEBUTTON name="Add Config" id="6df4c63927ed2876" memberName="configAdd"
               virtualName="" explicitFocusOrder="0" pos="208 72 16 16" tooltip="New Config"
               buttonText="new button" connectedEdges="0" needsCallback="1"
               radioGroupId="0" keepProportions="1" resourceNormal="add_png"
               opacityNormal="0.564625859" colourNormal="0" resourceOver="add_png"
               opacityOver="1" colourOver="0" resourceDown="" opacityDown="1"
               colourDown="0"/>
  <IMAGEBUTTON name="Delete Config" id="4e528abdccfba36f" memberName="configDelete"
               virtualName="" explicitFocusOrder="0" pos="232 72 16 16" tooltip="Delete Config"
               buttonText="new button" connectedEdges="0" needsCallback="1"
               radioGroupId="0" keepProportions="1" resourceNormal="delete_png"
               opacityNormal="0.564625859" colourNormal="0" resourceOver="delete_png"
               opacityOver="1" colourOver="0" resourceDown="" opacityDown="1"
               colourDown="0"/>
  <IMAGEBUTTON name="Edit Config" id="beb8a207b39bafcf" memberName="configEdit"
               virtualName="" explicitFocusOrder="0" pos="218 48 16 16" tooltip="Edit Config"
               buttonText="new button" connectedEdges="0" needsCallback="1"
               radioGroupId="0" keepProportions="1" resourceNormal="edit_png"
               opacityNormal="0.564625859" colourNormal="0" resourceOver=""
               opacityOver="1" colourOver="0" resourceDown="" opacityDown="1"
               colourDown="0"/>
</JUCER_COMPONENT>

END_JUCER_METADATA
*/
#endif

//==============================================================================
// Binary resources - be careful not to edit any of these sections!

// JUCER_RESOURCE: folder_png, 1340, "C:\folder.png"
static const unsigned char resource_KetonalSettingsComponent_folder_png[] = { 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122,244,0,0,0,1,115,82,71,66,0,174,206,28,
233,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,216,5,26,10,15,48,105,43,165,220,0,0,4,188,73,68,65,84,88,195,
237,151,217,107,84,87,28,199,191,247,220,253,206,150,213,177,201,180,38,3,162,3,214,106,137,45,86,107,30,124,240,33,80,132,22,44,133,34,181,224,147,164,15,6,218,216,135,82,108,5,11,66,251,15,116,65,132,
22,90,76,11,241,165,98,77,109,193,74,80,187,224,36,198,166,75,162,70,51,201,204,157,187,111,231,244,33,147,144,232,76,162,102,160,80,122,94,46,119,57,231,247,57,223,223,114,207,15,248,127,252,203,131,
91,233,131,252,248,164,10,96,51,128,75,185,108,134,61,200,162,249,241,73,5,192,22,0,215,114,217,76,249,161,0,242,227,147,105,0,59,0,60,87,185,62,45,10,188,20,132,209,103,0,94,207,101,51,81,149,57,169,
202,183,187,0,236,32,28,183,141,240,68,14,195,232,106,46,155,217,186,34,192,224,208,48,1,240,65,123,186,249,5,85,150,214,203,146,8,89,18,33,139,34,100,73,0,199,113,40,25,22,116,211,254,10,192,43,0,154,
43,198,118,2,216,201,19,178,89,150,68,34,75,34,20,73,132,36,10,0,128,66,177,12,203,245,182,231,178,153,139,139,141,14,14,13,111,0,208,216,211,221,117,81,168,60,123,22,192,225,199,90,26,145,136,169,85,
73,27,18,49,16,66,94,44,150,205,219,130,192,55,41,98,5,82,18,33,10,124,213,57,241,152,10,211,113,95,27,28,26,230,42,176,219,1,236,20,5,161,53,174,41,236,151,235,127,110,154,7,24,5,16,234,166,45,212,2,
0,128,100,76,69,92,85,154,8,169,29,58,65,24,161,108,218,208,77,11,37,195,70,217,180,15,106,138,124,48,21,215,144,76,104,104,72,196,160,41,50,102,117,147,51,108,71,224,22,201,114,182,49,25,223,189,101,
99,231,67,69,177,227,249,208,231,220,3,221,176,224,184,62,226,49,21,169,184,134,84,34,134,84,92,91,112,201,226,113,119,86,135,227,249,233,197,111,190,46,25,214,238,32,140,106,74,202,24,131,97,187,75,12,
82,198,22,140,165,155,27,144,140,169,32,132,172,8,30,81,234,231,178,153,187,139,1,6,24,99,31,205,148,202,220,218,150,198,170,147,126,250,245,58,194,48,66,115,67,18,77,201,56,58,219,215,32,166,42,143,148,
255,17,165,183,1,96,1,181,167,187,107,2,192,240,116,177,122,218,250,65,8,199,245,177,49,251,56,114,217,12,218,214,52,61,178,113,198,128,40,162,183,150,0,204,171,48,171,155,160,148,86,5,0,0,77,145,86,93,
253,162,185,245,111,86,3,56,77,41,197,140,110,84,1,8,0,0,146,40,214,1,32,2,128,59,247,1,244,116,119,229,1,140,20,170,184,193,243,3,240,132,64,224,201,234,1,34,10,0,147,213,20,0,128,129,153,146,1,198,150,
150,125,47,8,33,75,98,93,126,64,21,23,76,213,4,8,194,8,37,195,90,234,2,63,168,154,207,171,80,224,118,45,128,75,0,110,222,155,13,94,16,66,170,175,2,85,131,16,61,221,93,12,192,192,189,113,224,7,33,228,250,
42,80,211,5,0,48,224,249,1,202,166,189,36,8,235,230,2,74,189,92,54,83,88,14,96,8,192,236,98,55,248,245,12,194,104,174,10,214,4,232,233,238,10,0,12,22,74,229,5,227,140,177,186,40,96,187,30,34,74,39,230,
239,151,91,113,192,118,188,87,109,199,155,15,154,71,86,32,140,34,152,182,11,195,114,66,195,180,206,9,2,223,191,44,192,129,3,189,228,206,173,155,223,165,219,218,221,233,98,89,137,107,115,53,95,126,136,
42,200,24,131,237,250,48,29,23,101,195,156,208,117,227,139,177,177,223,79,94,203,143,141,156,120,255,77,191,42,192,222,189,123,185,214,246,231,249,166,6,87,30,201,143,242,45,233,181,67,211,69,125,143,
40,242,224,121,2,254,1,170,160,31,132,48,29,23,134,229,184,166,105,157,157,158,46,124,122,254,252,133,111,165,148,96,188,215,215,119,223,161,118,1,96,223,254,62,210,246,68,171,40,145,64,101,84,209,64,
249,152,81,54,126,228,121,126,143,97,58,203,238,158,82,6,203,113,231,12,155,246,168,105,90,167,70,242,163,167,198,71,70,255,62,118,236,237,112,57,96,1,0,122,123,123,137,148,106,85,57,142,211,16,9,49,10,
196,56,248,137,63,110,220,184,182,117,91,23,189,51,91,34,9,237,254,163,154,235,5,48,29,7,166,237,90,182,109,127,83,40,20,63,25,250,254,194,15,9,49,112,143,28,57,242,64,71,120,1,0,166,166,166,88,71,99,
103,8,234,19,16,26,231,193,154,24,67,170,172,151,85,215,113,199,20,85,217,48,31,128,97,68,231,118,107,187,204,118,156,43,150,229,156,188,114,229,183,207,167,254,26,191,123,244,104,63,93,85,99,114,232,
80,63,209,154,91,52,68,81,27,56,108,0,208,209,145,237,220,181,46,219,249,82,186,185,1,45,141,73,88,142,91,116,93,239,203,153,153,217,143,207,156,57,119,249,195,227,253,126,221,59,163,151,223,120,135,91,
151,80,85,202,145,39,56,142,123,102,211,83,79,238,91,159,237,144,9,199,78,93,190,250,243,233,137,25,79,63,118,120,63,171,71,81,90,177,53,123,235,221,19,98,20,80,133,4,156,125,252,120,95,244,159,107,78,
255,1,36,158,59,16,78,56,57,65,0,0,0,0,73,69,78,68,174,66,96,130,0,0};

const char* KetonalSettingsComponent::folder_png = (const char*) resource_KetonalSettingsComponent_folder_png;
const int KetonalSettingsComponent::folder_pngSize = 1340;

// JUCER_RESOURCE: close32_32_png, 1464, "C:\close32_32.png"
static const unsigned char resource_KetonalSettingsComponent_close32_32_png[] = { 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122,244,0,0,0,1,115,82,71,66,0,174,206,
28,233,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,216,5,26,10,21,15,111,96,114,58,0,0,5,56,73,68,65,84,88,195,
237,151,109,76,147,87,20,199,127,247,105,33,80,17,74,121,83,80,65,68,112,138,72,2,58,113,76,182,204,76,151,40,78,231,75,22,23,49,206,233,204,230,166,211,125,152,153,102,198,151,101,51,49,83,35,153,203,
54,51,19,157,111,97,139,51,168,115,78,183,41,78,132,200,134,70,163,192,202,139,133,150,34,150,23,69,104,159,187,15,15,82,75,1,169,154,236,203,78,114,211,246,158,115,239,249,223,243,63,231,244,94,248,143,
69,244,199,200,153,147,29,170,43,56,51,76,77,203,88,165,148,92,132,38,71,151,78,77,74,6,163,233,184,104,180,95,117,61,247,82,185,223,230,157,247,158,10,128,123,86,171,240,91,187,124,156,40,187,246,142,
98,169,158,200,221,214,100,164,236,125,167,1,65,160,40,5,234,232,212,2,57,120,200,46,125,238,126,243,99,135,229,254,254,111,13,234,248,216,229,106,82,136,67,14,81,164,76,9,151,50,70,72,25,77,255,198,200,
129,183,92,51,50,54,60,118,4,212,148,168,67,162,177,97,46,198,16,200,156,12,197,69,80,83,237,35,185,194,41,195,34,74,164,41,98,182,238,236,213,94,23,43,15,255,104,223,147,107,80,71,155,14,137,6,219,92,
226,226,32,103,49,84,85,61,218,185,78,7,198,80,48,12,208,190,3,72,169,23,118,91,186,176,219,202,156,57,217,111,57,87,44,20,143,4,160,59,178,119,167,104,118,204,37,126,4,204,153,15,181,181,80,250,215,163,
78,10,203,214,192,223,54,56,95,6,95,231,193,171,175,187,213,183,235,253,117,127,254,246,149,168,175,91,210,39,5,106,214,51,99,133,185,252,119,12,129,70,222,92,6,129,129,112,96,31,148,151,105,6,166,112,
136,30,2,21,101,112,183,197,189,195,160,104,56,94,12,145,131,220,115,142,70,120,118,56,52,187,171,133,160,224,118,90,154,226,132,133,218,158,35,112,219,254,30,29,237,70,178,94,132,129,3,161,177,17,170,
42,53,93,160,1,118,31,130,31,207,195,193,95,96,241,10,136,25,166,233,102,191,225,233,28,160,182,198,19,36,64,75,147,63,65,193,39,59,54,124,56,220,43,12,174,25,147,70,170,73,33,173,50,53,82,202,237,107,
165,220,189,81,202,165,51,221,89,253,249,199,82,186,92,178,75,84,85,74,91,157,148,7,247,72,89,119,75,122,201,206,79,123,174,142,24,69,170,99,194,183,120,69,64,134,134,101,137,102,135,129,145,73,16,16,
168,105,172,117,218,231,132,76,88,182,26,20,197,147,247,136,40,152,183,8,162,162,189,137,253,249,104,207,249,34,85,68,243,157,28,53,125,104,156,7,0,241,207,205,76,0,98,59,231,85,21,28,119,192,104,130,
79,182,65,176,209,183,18,156,62,7,82,210,53,234,188,218,170,51,154,251,109,11,91,139,10,149,75,21,54,13,128,82,126,29,244,122,8,14,241,52,30,145,8,99,211,124,239,100,75,63,128,159,46,192,129,83,240,246,
26,72,24,5,138,206,29,8,196,251,202,222,93,177,158,73,168,215,131,94,231,25,230,106,51,228,231,65,77,37,125,182,225,158,68,175,135,244,73,176,110,171,150,188,243,23,185,121,111,176,25,3,142,124,55,116,
124,124,228,67,0,58,58,192,233,236,180,80,32,40,8,108,117,240,238,2,200,206,128,25,25,176,126,37,228,237,131,198,6,223,192,132,154,32,117,124,247,220,75,7,208,3,200,168,104,132,213,2,77,77,16,213,89,82,
225,17,157,192,218,193,90,171,141,203,23,33,106,48,164,101,64,104,152,111,32,46,23,118,159,25,213,69,129,43,115,202,93,0,204,21,110,117,220,112,141,134,238,93,111,214,2,136,141,247,205,185,148,80,124,
161,251,172,127,23,0,93,225,31,185,4,4,194,205,155,208,214,166,169,141,161,16,17,233,185,36,44,18,22,46,239,217,73,71,7,124,179,29,206,156,208,26,209,3,58,65,203,165,154,202,158,83,5,192,53,101,186,89,
247,195,190,34,97,175,79,167,236,6,36,167,64,64,0,36,38,129,205,234,182,126,173,143,211,87,155,97,199,22,176,219,180,222,144,156,10,25,47,192,152,84,56,118,216,125,176,135,32,119,1,240,219,188,179,69,
77,14,223,134,16,251,57,243,43,196,39,128,193,0,41,227,224,114,49,180,182,106,255,114,211,102,245,30,230,210,98,104,168,239,108,98,22,109,156,206,239,139,152,27,158,101,104,24,144,135,159,127,41,183,27,
224,248,49,141,183,240,8,24,157,236,110,78,103,79,66,91,47,55,174,115,167,125,41,85,39,112,206,3,128,82,88,121,95,198,39,110,194,207,95,114,245,10,156,200,7,151,11,158,207,2,83,152,182,249,142,205,144,
153,8,91,215,131,185,76,211,131,86,150,69,5,190,164,229,21,224,154,215,141,232,158,213,234,23,144,153,240,25,173,205,43,1,65,210,40,152,250,10,88,173,144,119,88,75,180,7,18,96,128,23,167,106,85,81,90,
12,185,91,193,229,236,143,115,21,88,45,44,124,209,251,149,108,98,124,185,168,170,208,178,45,36,4,38,76,4,135,3,46,93,244,189,35,122,75,9,240,178,176,80,239,117,35,234,2,48,54,109,154,58,44,94,187,213,
58,28,112,234,36,92,191,246,52,158,1,141,192,170,7,206,123,5,96,221,244,165,213,25,18,58,25,248,30,208,142,220,228,120,210,211,183,3,171,128,179,253,126,152,200,104,252,128,37,192,70,32,236,9,156,219,
129,69,64,190,176,32,125,126,25,201,104,6,3,235,128,121,128,169,191,235,128,22,224,40,240,145,176,80,245,216,79,179,78,16,0,67,129,108,96,38,144,0,68,0,65,221,234,251,14,112,11,56,5,28,0,74,132,5,215,
19,189,13,123,0,163,116,58,143,1,140,221,120,182,3,102,97,161,141,255,165,31,242,47,226,71,31,220,152,51,103,51,0,0,0,0,73,69,78,68,174,66,96,130,0,0};

const char* KetonalSettingsComponent::close32_32_png = (const char*) resource_KetonalSettingsComponent_close32_32_png;
const int KetonalSettingsComponent::close32_32_pngSize = 1464;

// JUCER_RESOURCE: add_png, 846, "C:\add.png"
static const unsigned char resource_KetonalSettingsComponent_add_png[] = { 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,97,0,0,0,1,115,82,71,66,0,174,206,28,233,
0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,216,5,26,19,9,17,96,239,138,251,0,0,2,206,73,68,65,84,56,203,173,145,
77,104,92,101,20,134,159,239,124,119,238,157,159,76,103,156,144,105,141,210,98,147,80,163,84,199,16,17,55,86,5,21,233,178,248,3,110,92,138,20,234,162,216,133,75,161,226,70,92,40,184,150,130,80,2,5,193,
149,136,85,167,34,210,26,181,214,96,52,35,197,164,37,63,204,116,230,222,185,255,223,253,92,244,135,82,138,43,207,238,188,112,94,158,243,190,240,127,207,74,111,189,182,210,91,47,221,69,119,87,122,235,245,
59,117,245,197,55,231,91,123,38,155,47,180,39,155,207,139,72,71,68,29,200,141,89,138,226,244,195,146,227,220,175,181,44,136,168,71,181,200,211,198,20,122,123,48,124,232,202,86,63,115,180,190,215,243,74,
67,7,216,171,68,189,221,168,87,59,162,4,17,69,150,155,151,189,82,105,209,209,210,212,90,166,68,196,201,114,195,208,31,51,10,194,15,218,173,134,222,53,81,125,208,90,150,28,224,106,255,90,176,166,246,169,
142,136,186,73,230,229,198,204,199,105,74,146,230,228,198,160,69,49,81,173,176,248,240,236,75,74,41,114,99,108,16,198,226,0,253,36,203,150,253,113,116,164,89,175,1,176,221,31,162,148,162,90,118,169,53,
202,148,180,198,113,244,157,239,167,133,181,3,57,124,104,49,3,78,239,12,70,166,40,10,76,81,16,68,49,237,201,6,141,122,141,138,231,222,237,24,107,109,88,20,118,71,110,236,189,48,78,122,105,150,83,20,22,
107,45,90,228,63,219,42,44,137,197,142,28,128,195,135,22,205,217,31,127,59,29,132,241,137,122,173,226,220,150,5,155,201,101,126,245,191,102,121,212,197,149,50,247,121,179,204,79,60,193,126,183,19,217,
219,8,136,211,108,121,28,37,253,194,90,68,221,148,45,223,93,59,197,5,255,115,90,222,110,158,219,253,10,59,249,6,103,54,63,226,226,232,251,56,54,225,117,2,0,99,204,133,173,254,240,82,171,49,209,118,244,
117,131,191,195,223,233,231,191,16,153,4,133,98,95,245,0,175,237,61,142,159,13,248,244,242,251,18,100,195,234,45,130,60,203,182,199,81,124,41,8,99,244,13,3,223,12,112,181,166,44,53,158,153,58,194,132,
211,100,202,157,38,52,62,97,225,239,137,172,63,239,28,59,241,46,74,196,233,158,237,150,15,62,118,240,92,189,86,57,58,61,213,2,96,218,219,207,185,161,69,36,193,216,156,149,209,121,230,234,29,92,241,24,
231,67,15,216,229,136,104,113,28,93,81,48,189,182,250,87,208,110,183,67,176,213,52,203,209,73,61,200,147,230,134,91,74,230,150,54,62,150,196,68,60,57,249,34,37,113,1,250,64,79,255,208,253,202,46,60,242,
120,90,170,148,179,60,203,74,205,123,154,110,173,86,251,103,232,143,79,94,185,186,245,86,87,125,118,202,207,82,27,26,127,38,41,34,111,109,124,177,88,13,126,222,6,78,2,103,110,245,117,252,157,247,80,162,
157,153,217,153,246,220,236,3,197,31,127,174,110,190,249,250,171,246,141,159,158,82,64,3,120,22,152,1,20,176,10,124,249,201,194,183,227,127,1,235,36,71,117,191,62,244,158,0,0,0,0,73,69,78,68,174,66,96,
130,0,0};

const char* KetonalSettingsComponent::add_png = (const char*) resource_KetonalSettingsComponent_add_png;
const int KetonalSettingsComponent::add_pngSize = 846;

// JUCER_RESOURCE: delete_png, 832, "C:\delete.png"
static const unsigned char resource_KetonalSettingsComponent_delete_png[] = { 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,97,0,0,0,1,115,82,71,66,0,174,206,28,
233,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,216,5,26,19,9,25,110,52,2,201,0,0,2,192,73,68,65,84,56,203,173,
145,77,104,92,101,20,134,159,239,124,223,157,191,59,147,153,38,244,18,139,173,63,153,98,163,80,67,157,46,186,208,180,32,102,209,69,23,254,224,78,215,34,173,130,40,210,149,136,182,11,41,162,66,93,11,98,
9,45,168,84,4,193,69,165,96,4,181,11,41,105,211,118,144,152,164,76,50,76,102,146,249,185,115,239,253,238,231,194,36,72,41,174,60,187,243,114,222,195,115,206,11,255,119,205,215,151,252,249,250,146,119,
31,61,51,95,95,42,221,171,171,239,174,252,58,58,62,86,153,9,198,42,207,137,200,148,136,122,44,177,246,226,32,140,62,246,140,121,80,107,57,36,162,158,212,34,71,173,77,245,218,122,231,241,149,213,86,108,
180,126,32,155,245,58,6,216,167,68,189,93,46,21,166,68,9,34,138,56,177,47,101,61,175,102,180,84,180,150,221,34,98,226,196,210,217,236,177,209,237,159,11,70,203,122,164,88,56,224,28,23,13,112,183,213,238,
222,81,15,169,41,17,181,77,150,77,172,157,12,163,136,97,148,144,88,139,22,69,177,144,167,246,68,245,69,165,20,137,181,174,219,15,197,0,173,97,28,95,219,236,13,158,175,148,124,0,214,90,29,148,82,20,114,
25,252,114,14,79,107,140,209,247,158,31,165,206,173,203,241,233,90,12,204,54,215,55,108,154,166,216,52,165,59,8,9,198,202,148,75,62,249,108,230,126,102,156,115,253,52,117,77,217,234,235,253,112,88,143,
226,132,52,117,56,231,208,34,255,153,86,234,24,58,220,134,0,28,159,174,217,112,24,207,118,251,97,146,166,41,255,250,5,170,126,19,239,252,89,114,199,38,201,61,61,65,230,205,87,208,223,95,194,13,195,129,
75,93,211,108,15,134,81,124,173,55,24,182,252,66,46,16,37,219,156,120,95,158,71,255,242,19,44,214,1,208,151,103,145,185,43,232,147,237,144,218,244,198,14,167,181,246,183,213,86,231,122,146,88,140,254,
71,150,223,127,70,55,22,161,221,130,189,15,195,209,25,248,224,51,212,215,87,41,93,190,144,219,119,226,169,93,59,4,73,28,175,245,6,234,122,183,31,30,211,91,11,84,115,21,138,69,64,193,217,207,97,255,36,
236,30,135,27,127,160,154,141,113,134,225,65,125,234,157,247,57,242,204,179,102,121,113,185,88,26,41,122,38,147,121,161,92,244,41,249,121,156,49,152,31,190,65,217,4,246,62,10,97,8,167,95,135,115,239,193,
90,67,3,115,70,68,139,49,58,175,96,207,157,133,219,221,32,8,250,224,10,81,156,48,168,4,93,21,70,43,185,210,72,149,79,207,8,206,65,99,101,27,186,3,252,169,231,174,254,232,14,29,60,28,121,249,92,156,196,
177,87,217,85,201,248,190,255,87,103,179,247,225,114,99,245,141,234,71,239,126,197,221,21,195,160,87,101,179,147,221,50,183,129,79,128,47,118,242,122,235,244,25,148,104,51,81,157,8,246,87,31,73,111,222,
90,104,188,246,234,203,206,237,65,1,163,192,12,112,0,16,96,1,248,22,104,255,13,130,239,42,90,146,140,147,134,0,0,0,0,73,69,78,68,174,66,96,130,0,0};

const char* KetonalSettingsComponent::delete_png = (const char*) resource_KetonalSettingsComponent_delete_png;
const int KetonalSettingsComponent::delete_pngSize = 832;

// JUCER_RESOURCE: edit_png, 718, "C:\edit.png"
static const unsigned char resource_KetonalSettingsComponent_edit_png[] = { 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,97,0,0,0,1,115,82,71,66,0,174,206,28,233,
0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,216,5,26,19,9,6,227,60,15,60,0,0,2,78,73,68,65,84,56,203,141,147,203,
75,148,81,24,198,127,115,190,105,110,102,166,162,230,45,44,23,77,183,69,66,132,37,181,107,209,63,32,148,65,208,162,90,184,18,164,133,17,173,132,46,46,116,33,106,82,104,87,168,160,168,136,146,46,88,153,
65,34,161,25,99,206,12,54,234,140,206,52,51,54,243,125,243,205,237,180,201,107,99,248,192,225,192,123,206,243,227,121,207,225,133,53,164,106,250,1,175,63,84,63,230,244,20,176,94,169,154,190,79,213,244,
102,85,211,39,84,77,151,193,112,68,142,57,61,209,49,167,167,117,204,233,169,0,144,29,228,44,247,8,0,95,32,212,168,106,250,119,96,8,56,15,108,7,48,155,54,96,84,132,77,81,68,125,238,166,141,227,218,199,
166,6,32,144,238,52,118,44,7,40,190,185,64,173,132,29,153,82,21,229,231,82,90,144,207,38,139,98,52,77,62,186,10,40,65,243,46,59,160,44,0,210,163,35,35,157,170,166,103,108,203,168,8,12,6,80,70,174,32,194,
223,72,102,85,232,45,79,124,205,64,122,241,210,150,226,146,188,209,113,183,91,213,116,153,113,121,191,74,121,221,44,101,183,77,14,247,158,26,0,44,43,222,192,59,51,29,26,119,56,186,98,122,252,223,8,50,
141,105,224,28,164,116,130,57,71,200,174,110,218,239,15,4,203,87,0,128,244,181,203,205,55,2,161,249,95,171,253,194,209,141,50,251,129,116,214,86,60,197,103,41,42,46,85,44,22,115,227,106,0,253,239,222,
248,126,76,76,244,196,19,201,37,119,204,143,105,248,34,8,19,174,220,58,74,236,135,17,66,32,132,114,114,118,46,80,182,2,0,164,238,223,233,109,15,205,71,212,197,66,60,4,7,47,49,95,126,130,116,101,29,54,
155,109,225,200,108,181,90,27,86,3,184,217,221,229,114,186,221,15,147,169,20,0,111,7,29,60,251,146,196,177,249,52,37,229,219,150,130,197,19,184,126,78,217,1,33,86,181,156,232,123,249,162,45,28,81,147,
0,133,69,101,20,86,214,96,223,83,133,16,130,68,50,197,228,148,119,186,231,214,237,11,85,123,119,158,1,100,166,175,55,191,255,60,252,52,18,213,100,36,170,201,168,26,147,191,163,154,116,121,188,225,158,
187,15,90,75,203,202,119,3,214,255,206,68,75,91,251,209,153,185,160,140,170,49,57,229,11,232,143,159,191,186,87,125,168,166,26,200,6,12,235,153,43,91,255,224,80,223,235,254,79,125,181,199,235,142,1,121,
107,25,215,162,25,128,98,32,5,248,255,238,25,245,7,89,210,20,176,242,134,37,12,0,0,0,0,73,69,78,68,174,66,96,130,0,0};

const char* KetonalSettingsComponent::edit_png = (const char*) resource_KetonalSettingsComponent_edit_png;
const int KetonalSettingsComponent::edit_pngSize = 718;
